using System;

namespace SeataNet.Core.TCC
{
    /// <summary>
    /// TCC服务标记特性
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false, Inherited = false)]
    public class TccServiceAttribute : Attribute
    {
        /// <summary>
        /// 服务名称
        /// </summary>
        public string? ServiceName { get; set; }

        /// <summary>
        /// 是否为本地服务
        /// </summary>
        public bool IsLocalService { get; set; } = true;

        /// <summary>
        /// 提交方法名称
        /// </summary>
        public string? CommitMethod { get; set; }

        /// <summary>
        /// 回滚方法名称
        /// </summary>
        public string? RollbackMethod { get; set; }
    }
}
